package com.codingfuture.erp_system.service.impl;

import com.codingfuture.erp_system.mapper.OrderDetailMapper;
import com.codingfuture.erp_system.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

@Service
public class OrderDetailServiceImpl implements OrderDetailService {

    @Autowired
    private OrderDetailMapper orderDetailMapper;

//    @Override
//    public Boolean doInStore(Integer id, Integer storeuuid) {
//        return orderDetailMapper.doInStore(id,storeuuid) !=0;
//    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public Boolean doInStore(Integer id, Integer storeuuid, Date date) {
        return orderDetailMapper.doInStore(id, storeuuid, date) != 0;
    }
}
